package com.quanyan.pay.enums;



/**
 * 支付方式
 *
 * @author songzj
 * @date 16/6/29-10:14
 */
public enum PayWayEnum {

    PAY_WAY_ALIPAY(1, "PAY_WAY_ALIPAY", "支付宝支付"),
    PAY_WAY_WEICHAT(2, "PAY_WAY_WEICHAT", "微信APP支付"),
    PAY_WAY_WEICHATH5(3, "PAY_WAY_WEICHATH5", "微信公众号支付"),
    PAY_WAY_UNION_PAY(4, "PAY_WAY_UNION_PAY", "银联支付"),
    PAY_WAY_APPLE_PAY(5, "PAY_WAY_APPLE_PAY", "Apple Pay"),
    PAY_WAY_FOR_FREE(6, "PAY_WAY_FOR_FREE", "免费"),
    PAY_WAY_FOR_AGES(7, "PAY_WAY_FOR_AGES", "鸟蛋支付"),
    PAY_WAY_FOR_SHELL(8, "PAY_WAY_FOR_SHELL", "蛋壳支付"),
    PAY_WAY_FOR_DEDUCTION(9, "PAY_WAY_FOR_DEDUCTION", "俱乐部会费"),
    PAY_WAY_FOR_PLACE_VIP(10, "PAY_WAY_FOR_PLACE_VIP", "场馆会员抵扣"),
    PAY_WAY_FOR_COUPON(11, "PAY_WAY_FOR_COUPON", "优惠券抵扣"),
    PAY_WAY_ALIPAY_SCAN(12, "PAY_WAY_ALIPAY_SCAN", "支付宝扫描枪支付"),
    PAY_WAY_WEICHAT_SCAN(13, "PAY_WAY_WEICHAT_SCAN", "微信扫描枪支付"),
    PAY_WAY_ALIPAY_H5(14, "PAY_WAY_ALIPAY_H5", "支付宝H5支付"),
    PAY_WAY_WEICHAT_APPLET(15, "PAY_WAY_WEICHAT_APPLET", "微信小程序支付"),
    PAY_WAY_UNION_PAY_POS(16, "PAY_WAY_UNION_PAY_POS", "银联POS机支付"),
    PAY_WAY_ALIPAY_SCAN_CODE(17, "PAY_WAY_ALIPAY_SCAN_CODE", "支付宝扫码支付"),
    PAY_WAY_WEICHAT_SCAN_CODE(18, "PAY_WAY_WEICHAT_SCAN_CODE", "微信扫码支付"),
    ;

    private Integer payId;

    private String code;

    private String payType;

    public static PayWayEnum getById(Integer payId) {
        if(null==payId){
            return null;
        }
        for(PayWayEnum tmp: PayWayEnum.values()) {
            if(tmp.payId.intValue() == payId.intValue()) {
                return tmp;
            }
        }
        return null;
    }

    PayWayEnum(Integer payId, String code, String payType) {
        this.payId = payId;
        this.code = code;
        this.payType = payType;
    }

    public Integer getPayId() {
        return payId;
    }

    public void setPayId(Integer payId) {
        this.payId = payId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }
}
